package com.xiaojian.blog.model.VO;

import com.xiaojian.blog.model.CommentPO;
import com.xiaojian.blog.model.CommentPOExample;

import java.util.List;

/**
 * 返回页面的评论内容,包含父子评论内容
 */
public class CommentVO extends CommentPO {

    private int levels;

    private List<CommentPO> children;

    public CommentVO(CommentPO commentPO) {
        setAuthor(commentPO.getAuthor());
        setMail(commentPO.getMail());
        setCoid(commentPO.getCoid());
        setAuthorId(commentPO.getAuthorId());
        setUrl(commentPO.getUrl());
        setCreated(commentPO.getCreated());
        setAgent(commentPO.getAgent());//设置评论者客户端
        setIp(commentPO.getIp());
        setContent(commentPO.getContent());
        setOwnerId(commentPO.getOwnerId());//设置坐着id
        setCid(commentPO.getCid());
    }

    public int getLevels() {
        return levels;
    }

    public void setLevels(int levels) {
        this.levels = levels;
    }

    public List<CommentPO> getChildren() {
        return children;
    }

    public void setChildren(List<CommentPO> children) {
        this.children = children;
    }
}
